package xpn.platform.modules.sys.permission;

import lombok.Getter;
import lombok.Setter;

import org.hibernate.validator.constraints.Length;
import xpn.platform.common.persistence.AbstractEntity;

import javax.persistence.*;

@Entity
@Getter
@Setter
public class SysPermission extends AbstractEntity {
	private static final long serialVersionUID = 1347464412710018792L;

	@Column(length = 40, unique=true, nullable=false)
	@Length(min = 2, max = 40)
	private String name; //权限名称
	
	@Column(length = 40, unique=true, nullable=false)
	@Length(min = 2, max = 40)
	private String no; //权限编号

	@Column(length = 255)
	@Length(max = 255)
	private String authorizationRule; //授权规则
	
	@Column(length = 100)
	private String description; //描述

	private Boolean enable = Boolean.TRUE;  //是否启用
}
